package xx.iverson.school_manage.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xx.iverson.school_manage.entity.OperationRecord;

import java.util.List;

/**
 * @author wei77
 */
@Mapper
public interface OperationRecordMapper {
    // 增加积分
    Boolean insertIncreaseOperationRecord(OperationRecord operationRecord);

    // 减少积分
    Boolean insertDecreaseOperationRecord(OperationRecord operationRecord);

    // 查询操作记录
    List<OperationRecord> selectOperationRecord(Integer userId);

    // 根据年份和月份查询操作记录
    List<OperationRecord> findOperationRecordsByMonth(@Param("year") int year, @Param("month")int month, @Param("userId")int userId);

    // 根据年份和月份导出操作记录
    List<OperationRecord> exportOperationRecordsByMonth(@Param("start") int start, @Param("end")int end, @Param("userId")int userId);

    //根据年份和月份导出操作记录
    List<OperationRecord> findRecordsByMonth(@Param("formattedStartDate")int formattedStartDate, @Param("formattedEndDate")int formattedEndDate);
}
